#version 440 core

layout(location=0) in vec3 position;
layout(location=1) in vec2 texCoords;

uniform vec2 invImageSize;
uniform vec2 pOrigin;

out vec2 vf_texCoords;

void main(void)
{
	gl_Position = vec4(
		vec2(-1.f,1.f)
			+ 2.f * invImageSize * (vec2(pOrigin.x,-pOrigin.y) + position.xy),
		position.z,
		1.f);

	vf_texCoords = texCoords;
}